<?php if(is_array($this->messages) && isset($this->messages)){?>
<?php 
foreach($this->messages as $key=>$message)
{
?>
    <?php 
    if(is_array($message)){
        echo $this->partial('script_messages_li.phtml', array(
            'messages'     => $message,
        ));
    }else{
    ?>
    <li>
    <?php 
        //$this->setEscape(array('Ext_Utility_String', 'escapeForJson'));
        echo $this->escape($message);
    ?>
    </li>
    <?php }?>
<?php 
}
?>
<?php }?>